﻿using System.Web;
using System.Web.Mvc;

namespace Azure.Online.Web.Routing {
    public static class UrlHelperExt {
        public static AzureOnlineUrls AzureOnline(this UrlHelper helper) {
            var urls = HttpContext.Current.Items["azureonline.urls"] as AzureOnlineUrls;
            if (urls == null) {
                urls = new AzureOnlineUrls(helper);
                HttpContext.Current.Items["azureonline.urls"] = urls;
            }

            return urls;
        }
    }
}